
#import "ModuleController.h"
#import "Imports.h"


@implementation ModuleController

- init
{
	GoAhead=FALSE;
	return self;
}

- TurnOffMenu:sender
{
	[AdjustButton setEnabled:NO];
	return self;
}

- TurnOnMenu:sender
{
    	[AdjustButton setEnabled:YES];
	return self;
}

- Cancelled:sender;
{
	[NXApp stopModal];
	[CompactPanel close];
	GoAhead=FALSE;
	return self;
}

- Okayed:sender;
{
	[NXApp stopModal];
	[CompactPanel close];
	GoAhead=TRUE;
	return self;
}
	
- (BOOL) RunCompactPanel:sender
{
	[CompactPanel makeKeyAndOrderFront:self];
	[NXApp runModalFor:CompactPanel];
	return GoAhead;
}

- CurrentSound:sender
{
	return [TheFileController CurrentSound:sender];
}

- CurrentSoundView:sender
{
	return [TheFileController CurrentSoundView:sender];
}

- CurrentWindow:sender
{
	return [TheFileController CurrentWindow:sender];
}

- CurrentScrollView:sender
{
	if ([TheFileController CurrentWindow:self]==NULL)
		{return NULL;}
	else
		{return [[TheFileController CurrentWindow:self] contentView];}
}

- SoundChanged:ThisSound;
{
	[TheFileController SoundChanged:ThisSound];
	return self;
}

- ChangeSelection:sender
{
	[TheEditController ChangeSelection:sender];
	return self;
}

- ResetSelection:sender
{
	[TheEditController ResetSelection:sender];
	return self;
}

- ChangeInfo:ThisSound
{
	[TheInfoManager ChangeInfo:ThisSound];
	return self;
}

- ZoomChanged:sender
{
	[TheEditController ZoomChanged:sender];
	return self;
}

- Stop:sender
{
	[TheSoundManager Stop:sender];
	return self;
}

- Play:sender
{
	[TheSoundManager Play:sender];
	return self;
}

- (BOOL) IsPlaying
{
	return [TheSoundManager IsPlaying];
}

- (BOOL) IsRecording
{
	return [TheSoundManager IsRecording];
}
	
	
	
	
	

@end
